# Sorry for this poorly written Makefile


CXX=g++
LIB_BOOST=
#LIB_BOOST=-Iwhere_is_boost_include 
LIB_DODO_UTILS=-I../
INC_LINK=$(LIB_BOOST) $(LIB_DODO_UTILS) 

ALL_OBJ=big_header.o defines.o mm5_file.o sub_header.o var_info.o var_pool.o

test.exe : $(ALL_OBJ) test.cpp
	$(CXX) $(ALL_OBJ) test.cpp -o test.exe $(INC_LINK)

lib : $(ALL_OBJ)
	ar ru libdodo_mm5.a $(ALL_OBJ)
	$(CXX) -shared -fPIC -o libdodo_mm5.so $(ALL_OBJ) $(INC_LINK)

big_header.o : big_header.cpp big_header.h defines.h 
	$(CXX) -fPIC -c big_header.cpp $(INC_LINK)

defines.o : defines.cpp defines.h
	$(CXX) -fPIC -c defines.cpp $(INC_LINK)

mm5_file.o : mm5_file.cpp mm5_file.h defines.h var_info.h big_header.h sub_header.h
	$(CXX) -fPIC -c mm5_file.cpp $(INC_LINK)

sub_header.o : sub_header.cpp sub_header.h defines.h
	$(CXX) -fPIC -c sub_header.cpp $(INC_LINK)

var_info.o : var_info.cpp var_info.h defines.h mm5_file.h sub_header.h
	$(CXX) -fPIC -c var_info.cpp $(INC_LINK)

var_pool.o : var_pool.cpp var_pool.h defines.h mm5_file.h
	$(CXX) -fPIC -c var_pool.cpp $(INC_LINK)

.PHONY : clean
clean :
	rm -f $(ALL_OBJ) lib_dodomm5.a lib_dodomm5.so


